'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller,jwt,middleware } = app;
  const _jwt=middleware.jwtErr(app.config.jwt);
  router.post('/api/user/register',controller.user.register);
  router.post('/api/user/login',controller.user.login);
  router.get('/api/bill/list',_jwt,controller.bill.list); // 获取账单列表
  router.get('/api/type/list',_jwt,controller.type.list); // 获取类型列表
};
